﻿<%@ Page Language="C#"  Inherits="E.Web.Teacher.internals.surveysetting.CertificateList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>认证或项目问卷调查管理</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  <link rel="stylesheet" href="/css/main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_main.css" type="text/css" media="all" />
  <script type="text/javascript" src="/js/CheckBox.js"></script>
  <script type="text/javascript">
    SetCheckBoxProperty("SltAllbtn", "p_chkb");
    function D() {
      if (confirm("确定要删除所选项目吗？对选项的删除操作可能会影响到已有问卷调查的结果。只有未被设置的选项才可被删除。")) {
        var arr = [];
        var chblist = document.getElementsByName("p_chkb");
        for (var i = 0; i < chblist.length; i++) {
          if (chblist[i].checked) {
            arr.push(chblist[i].value);
          }
        }
        if (arr.length == 0) {
          alert("未选择任何项目吗");
        } else {
          document.getElementById("arrv").value = arr;
          document.getElementById("form1").action = "/internals/surveysetting/D.aspx?act=d&t=2";
          document.getElementById("form1").submit();
        }
      }
    }
  </script>
  <style type="text/css">
    .d_r_cb{ float:left; width:50px; }	/*复选框*/
    .d_r_t{ float:left; width:350px; }	/*选项名称*/
    .d_r_c{ float:left; width:100px; }	/*类别*/
    .d_r_o{ float:left; width:100px; }	/*操作*/
  </style>
</head>
<body>
  <form id="form1" method="post" action="?act=s">
    <div class="m_top"></div>
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;问卷调查选项管理</div>
      </div>
      <div class="spe_line_2"></div>
      <div style="width:650px; height:23px; margin-top:6px;">
        <div class="fl">&nbsp;&nbsp;<a href="/internals/surveysetting/CertificateEdit.aspx?act=n"><img alt="" src="/images/btn/add_2.gif" /></a></div>
      </div>
    </div>
    <div class="block_2">
      
      <div class="spe_line_2"></div>
    <% if (certificateSurveyList != null && certificateSurveyList.Count > 0) { %>
    
      <div id="datatable">
        <div class="data_rows" style="font-weight:bolder;">
          <div class="d_r_cb"><input type="checkbox" id="SltAllbtn" onclick="SelectAllCheckBox();" class="chkb" /></div>
          <div class="d_r_t">课程名称</div>
          <div class="d_r_o">操作</div>
        </div>
        
        <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in certificateSurveyList) { %>
        <div class="data_rows">
          <div class="d_r_cb"><input type="checkbox" id="chkb_<%=kvp.Key %>" name="p_chkb" value="<%=kvp.Key %>" class="chkb" onclick="SelectThis();" /></div>
          <div class="d_r_t"><%=kvp.Value %></div>
          <div class="d_r_o"><a href="/internals/surveysetting/CertificateEdit.aspx?act=u&id=<%=kvp.Key %>">编辑</a></div>
        </div>
        <% } %>
        
      </div>
      
      <div style="margin:8px 0 0 0;">
        <input type="hidden" id="arrv" name="arrv" />
        <img alt="" src="/images/btn/del_s.gif" class="cursor" onclick="D();" />
      </div>
      
    <% } else { %>
    <% } %>
    
    </div>
    
  </form>
</body>
</html>
